import Cookies from 'js-cookie'

const TokenKey = 'hm_158_token'
/**
 * 获取本地存储的token
 * @returns 用户token
 */
export function getToken() {
  return Cookies.get(TokenKey)
}
/**
 * 存储token到本地
 * @param {string} token
 */
export function setToken(token) {
  return Cookies.set(TokenKey, token)
}
/**
 * 删除token
 */
export function removeToken() {
  return Cookies.remove(TokenKey)
}
